<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>sysmonpsu: xsysmonpsu_low_level_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">sysmonpsu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xsysmonpsu__low__level__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xsysmonpsu_low_level_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a design example using the basic driver functions of the System Monitor driver. </p>
<p>The example here shows using the driver/device in polled mode to check the on-chip temperature and voltages.</p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>The values of the on-chip temperature and the on-chip Vccaux voltage are read from the device and then the alarm thresholds are set in such a manner that the alarms occur.</p>
<pre></pre><pre>MODIFICATION HISTORY:</pre><pre>Ver   Who    Date     Changes
</p>
<hr/>
<p>
1.0   kvn    12/15/15 First release
      mn     03/08/18 Update code to run at higher frequency</pre><pre>2.6   aad    11/21/19 Removed reading of AUX channels
2.9   cog    07/20/23 Added support for SDT flow
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a9e7072b7a66ba79e4b21e515b11fa04f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsysmonpsu__low__level__example_8c.html#a9e7072b7a66ba79e4b21e515b11fa04f">SysMonPsuLowLevelExample</a> (u32 BaseAddress)</td></tr>
<tr class="memdesc:a9e7072b7a66ba79e4b21e515b11fa04f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function runs a test on the System Monitor device using the basic driver functions.  <a href="#a9e7072b7a66ba79e4b21e515b11fa04f">More...</a><br/></td></tr>
<tr class="separator:a9e7072b7a66ba79e4b21e515b11fa04f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsysmonpsu__low__level__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function that invokes the example given in this file.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function that invokes the example given in this file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the example has completed successfully.</li>
<li>XST_FAILURE if the example has failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xsysmonpsu__low__level__example_8c.html#a9e7072b7a66ba79e4b21e515b11fa04f">SysMonPsuLowLevelExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a9e7072b7a66ba79e4b21e515b11fa04f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SysMonPsuLowLevelExample </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>BaseAddress</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function runs a test on the System Monitor device using the basic driver functions. </p>
<p>The function does the following tasks:</p>
<ul>
<li>Reset the device</li>
<li>Setup alarm thresholds for on-chip temperature and VCCAUX.</li>
<li>Setup sequence registers to continuously monitor on-chip temperature and VCCAUX.</li>
<li>Setup configuration registers to start the sequence.</li>
<li>Read latest on-chip temperature and VCCAUX, as well as their maximum and minimum values. Also check if alarm(s) are set.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">BaseAddress</td><td>is the XPAR_&lt;SYSMON_instance&gt;_BASEADDRESS value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xsysmonpsu_8h.html#a7cd77d90e7456614726390476f3636c8">XSM_AVG_16_SAMPLES</a>, <a class="el" href="xsysmonpsu_8h.html#a090e870886f3ed8d58efc57c763772f2">XSM_SEQ_MODE_CONTINPASS</a>, <a class="el" href="xsysmonpsu_8h.html#a223c74befcd8a6710ea7a7acbaf41636">XSM_SEQ_MODE_SAFE</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a64b865cb3178ee60bb6fb94c822e317d">XSYSMONPSU_ALRM_SUP3_LWR_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a3c488cd443d9720dc14a1a5381bcca8d">XSYSMONPSU_ALRM_SUP3_UPR_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a531009f056913bfecb5b591d9f91385c">XSYSMONPSU_ALRM_TEMP_UPR_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#acc78e04e37a1d847fc610a978356adc1">XSYSMONPSU_CFG_REG0_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#acd26481ffd9f4c26a41779246aa2cf8a">XSYSMONPSU_CFG_REG1_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a83ea9d678f45ad885e86555b51d308cd">XSYSMONPSU_ISR_0_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a4f60260a330cb9d25d5ff40a293442c5">XSYSMONPSU_ISR_1_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a91a2b5503e6ef8e15a007c38cf6fc7a3">XSYSMONPSU_MAX_SUP3_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#ac75f621913d7a951c4ae4bf7568b7583">XSYSMONPSU_MAX_TEMP_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#ac01bf0b36322c8a07bb391cbc95fd449">XSYSMONPSU_MIN_SUP3_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#affd36d6f86790aa558c960f033615c3b">XSYSMONPSU_MIN_TEMP_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a26a83b449c5188602bafa2bfaa24e18c">XSYSMONPSU_SEQ_AVERAGE0_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#abf302f7a79ec4d2aee5b9756441ce71d">XSYSMONPSU_SEQ_CH0_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#ae6db7e651e88b7e5057cda2ba7883aa5">XSYSMONPSU_STS_FLAG_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#aa357cac772b514b4a1e28e12fa97d12f">XSYSMONPSU_SUP3_OFFSET</a>, <a class="el" href="xsysmonpsu__hw_8h.html#a19b227d2495b41d0f2260aa8a2efe9b3">XSYSMONPSU_TEMP_OFFSET</a>, and <a class="el" href="xsysmonpsu__hw_8h.html#a69b79177a69bce2ea1055e2b969a9f57">XSYSMONPSU_VP_VN_OFFSET</a>.</p>

<p>Referenced by <a class="el" href="xsysmonpsu__low__level__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
